

package com.hazelcast.client.impl.protocol.codec.builtin;

import com.hazelcast.client.impl.protocol.ClientMessage;
import com.hazelcast.internal.serialization.Data;

import java.util.Collection;
import java.util.List;

public final class ListDataCodec {

    private ListDataCodec() {
    }

    public static void encode(ClientMessage clientMessage, Collection<Data> collection) {
        ListMultiFrameCodec.encode(clientMessage, collection, DataCodec::encode);
    }

    public static List<Data> decode(ClientMessage.ForwardFrameIterator iterator) {
        return ListMultiFrameCodec.decode(iterator, DataCodec::decode);
    }
}
